﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BullShitPokerServer
{
    class Player
    {
        string name;
        object locker = new object();
        public string Name
        {
            get
            {
                lock (name) return name;
            }
            private set
            {
                lock (locker) name = value;
            }
        }
        int countCards;
        public int CountCards
        {
            get
            {
                lock (locker) return countCards;
            }
            set
            {
                if (value > 3 || value < 0) value = 0;
                lock (locker) countCards = value;
            }
        }
        string cards;
        public string Cards
        {
            get
            {
                lock (locker) return cards;
            }
            set
            {
                lock (locker) cards = value;
            }
        }

        public Player(string name)
        {
            Name = name;
            CountCards = 3;
            Cards = "";
        }
    }
}
